//
//  ViewController.swift
//  OpenGLDemo1
//
//  Created by Ming on 2018/9/28.
//  Copyright © 2018年 Ming. All rights reserved.
//

import UIKit

class ViewController: UIViewController {
    private lazy var renderView: HUMOpenGLRenderView = {
        let view = HUMOpenGLRenderView()
        return view
    }()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        let render = HUMOpenGLRender1()
        
        renderView.render = render
        view.addSubview(renderView)
        renderView.startAnimation()
    }
    
    override func viewWillLayoutSubviews() {
        super.viewWillLayoutSubviews()
        renderView.frame = view.bounds.insetBy(dx: 20, dy: 40)
    }
    
    
}

